package com.advertisementsystem.Dto;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
@Data
public class UserUpdateDTO {
    @Length(max = 50, message = "昵称长度不能超过50个字符")
    private String nickname;

    @Email(message = "邮箱格式不正确")
    private String email;

    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;

    // 可选的密码更新
    @Length(min = 6, max = 20, message = "密码长度必须在6-20之间")
    private String newPassword;

    private String confirmPassword;

    private String avatar;
}
